package com.zy.design.pattern.composite;

import java.util.Arrays;

/**
 * @author zhaoyi
 * @date 2021/4/29 18:11
 */
public class Test {

    public static void main(String[] args) {
        ListNode root = new ListNode("/root", null);
        ListNode home = new ListNode("home", root);
        ListNode hadoop = new ListNode("hadoop", home);
        ListNode web = new ListNode("web", hadoop);
        ListNode data = new ListNode("data", web);


        new FileNode("1.txt", hadoop);
        new FileNode("index.html", web);
        new FileNode("mysql", data);
        new FileNode("hive", data);
        new FileNode("base.css", web);

        //hadoop.getList().forEach(System.out::println);

        hadoop.printAll(1);
        System.out.println("===========================");
        root.printAll(1);


    }
}
